const { sequelize } = require("@core/db");
const { Sequelize, Model } = require("sequelize");

class BlackList extends Model {}

BlackList.init(
  {
    blacklist_id: {
      type: Sequelize.INTEGER,
      primaryKey: true,
      autoIncrement: true,
    },
    uid: {
      type: Sequelize.INTEGER,
      comment: "用户id",
    },
    ip: {
      type: Sequelize.STRING(256),
      comment: "ip地址",
    },
  },
  {
    sequelize,
    tableName: "blacklist",
  }
);

module.exports = {
  BlackList,
};
